import React, { useState, useEffect } from "react";
import { getJiuGui } from "../../../components/api";
import { NavLink } from "react-router-dom";
import style from "./jiug.module.css";
import EbookTil from "../../common/ebookTil"

interface TianJiu {
    id: number,
    img: string,
    title: string,
    create_time: string
}
interface IAll {
    introduce?: string,
    content?: TianJiu
}

export default function JiuGui() {
    let [tianList, setTian] = useState<IAll>({});
    const get_Jiu = async () => {
        let res = await getJiuGui();
        console.log(res, 'getJiuGui');
        setTian(res.data[1]);

    }
    let title = tianList.introduce
    let content: any = tianList.content
    useEffect(() => {
        get_Jiu();
    }, [])
    return (
        <div>
            <EbookTil title={title}></EbookTil>
            {/* <img src={
                tianList.content[0].img
            } alt="" /> */}
        </div>
        
    )
}